import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DemoFile {
    public static void main(String[] args) {
        File f = new File("d://java题集");
        System.out.println(f.getAbsoluteFile());


        File fs[] = f.listFiles();
        int i = 1;
        for(File n :fs) {
            Date d = new Date(n.lastModified());
            SimpleDateFormat sdf = new SimpleDateFormat("yyy-mm-dd hh:mm:ss");
            System.out.println(i + "\t" + n.getName() + "\t " + n.length() + "\t" + sdf.format(d));
            i++;
        }
    }
}
